package o;

import android.app.Activity;
import android.content.Intent;
import com.huawei.appgallery.appcomment.ui.CommentActivity;
import com.huawei.hmf.annotation.ApiDefine;
import o.bcg.h;

@ApiDefine(uri = bci.class)
public class bco implements bci, bdz {
    private Activity ˊ;
    private boolean ˎ = false;
    private bch ॱ;

    public void ॱ(Activity activity, bch o_bch) {
        if (activity != null) {
            this.ˊ = activity;
            this.ॱ = o_bch;
            if (bmt.ˊ(activity)) {
                new bdr(activity, this).ˎ();
            } else {
                ckv.ˎ(activity.getString(h.ᐝʽ), 0);
            }
        }
    }

    public void ˏ(boolean z) {
        this.ˎ = z;
    }

    public void ˊ() {
        if (this.ˊ != null) {
            Intent intent = new Intent(this.ˊ, CommentActivity.class);
            intent.putExtras(ber.ॱ(this.ॱ));
            this.ˊ.startActivityForResult(intent, 1001);
        }
    }

    public void ˋ() {
        bcb.ˋ.ˋ("PublishAppCommentImpl", "Comment interrupt");
        if (this.ˊ != null && this.ˎ) {
            this.ˊ.setResult(102);
            this.ˊ.finish();
        }
    }
}
